import { FG } from "./req"

export const getUserInfo = (obj = { id: 1000 }) => {
  return FG.get({
    url: "/getuserinfo_userId",
    data: {
      ...obj
    }
  })
}
export const getMsgList = (obj = { uid: "" }) => {
  return FG.post({
    url: "/getnewestmessage",
    data: {
      ...obj
    }
  })
}
export const getRelation = (obj = { uid: "", fid: '' }) => {
  return FG.post({
    url: "/checkstatus",
    data: {
      ...obj
    }
  })
}
export const uploadFile = (obj = { file }, callback = () => { }) => {
  return FG.uploadFile({
    url: "/upload_static",
    data: {
      ...obj
    },
    callback: callback
  })
}
export const fileIsFound = (obj = { filePath }) => {
  return FG.get({
    url: "/isFound",
    data: {
      ...obj
    }
  })
}
export const getFile = (obj = { filePath }, callback = () => { }) => {
  return FG.downloadFile({
    url: "/getFile_static",
    data: {
      ...obj
    },
    callback: callback
  })
}
export const clearUnread = (obj = { myId: "", targetId: '' }) => {
  return FG.post({
    url: "/clearunreadmsg",
    data: {
      ...obj
    }
  })
}